package com.neusoft.neuiotms.dcam.common.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "ah_printer", comment = "打印机设置表")
@Table(name = "ah_printer")
public class Printer extends AbstractModel {

    private static final long serialVersionUID = 1L;

    /** 打印机IP地址 */
    @NotBlank(message = "打印机IP不能为空")
    @Length(max = 255, message = "打印机IP不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String ip;

    /** 打印机端口 */
    private int port = 1801;

    /** 所属 */
    @Length(max = 255, message = "所属不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String belongs;

    /** 部门 */
    @Length(max = 255, message = "所属部门不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String departmentCode;

    /** 部门 */
    @Length(max = 255, message = "所属部门名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String departmentName;

    /** 标签标题 */
    @Length(max = 255, message = "标签标题不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String labelTitle;

    /** 打印标签纸左侧边距 */
    private float leftMargin = 0f;
}
